package com.tjbank.cssys.mybatis.mapper;

import com.tjbank.cssys.mybatis.entity.IamUser;
import com.tjbank.cssys.mybatis.entity.IamUserKey;
import com.tjbank.cssys.mybatis.sqlbuilder.IamUserSqlBuilder;

import java.util.List;
import java.util.Map;

/**
 * IamUserMapper
 * 
 * @author PG(Auto Generator)
 * @version V2.0
 */
public interface IamUserMapper {

    /**
     * 根据SqlBuilder查询列表，返回值包含大字段栏位
     * 
     * @param iamUserSqlBuilder
     * @return
     * @throws Exception
     */
    public List<IamUser> selectBySqlBuilderWithBLOBs(IamUserSqlBuilder iamUserSqlBuilder) throws RuntimeException;

    /**
     * 根据SqlBuilder查询列表，返回值不包含大字段栏位
     * 
     * @param iamUserSqlBuilder
     * @return
     * @throws Exception
     */
    public List<IamUser> selectBySqlBuilder(IamUserSqlBuilder iamUserSqlBuilder) throws RuntimeException;

    /**
     * 根据主键查询单个对象
     * 
     * @param iamUserKey
     * @return
     * @throws Exception
     */
    public IamUser selectByPrimaryKey(IamUserKey iamUserKey) throws RuntimeException;

    /**
     * 根据SqlBuilder统计记录条数
     * 
     * @param iamUserSqlBuilder
     * @return
     * @throws Exception
     */
    public long countBySqlBuilder(IamUserSqlBuilder iamUserSqlBuilder) throws RuntimeException;

    /**
     * 单条插入新增记录
     * 
     * @param iamUser
     * @return
     * @throws Exception
     */
    public int insert(IamUser iamUser) throws RuntimeException;

    /**
     * 批量插入新增记录
     * 
     * @param listIamUser
     * @return
     * @throws Exception
     */
    public int insertUseBatch(List<IamUser> listIamUser) throws RuntimeException;

    /**
     * 根据SqlBuilder更新记录，空值会持久化到数据库
     * 
     * @param iamUserSqlBuilder
     * @return
     * @throws Exception
     */
    public int updateBySqlBuilder(IamUserSqlBuilder iamUserSqlBuilder) throws RuntimeException;

    /**
     * 根据SqlBuilder更新记录，空值不会持久化到数据库
     * 
     * @param iamUserSqlBuilder
     * @return
     * @throws Exception
     */
    public int updateBySqlBuilderSelective(IamUserSqlBuilder iamUserSqlBuilder) throws RuntimeException;

    /**
     * 根据主键更新记录，空值会持久化到数据库
     * 
     * @param iamUserKey
     * @return
     * @throws Exception
     */
    public int updateByPrimaryKey(IamUserKey iamUserKey) throws RuntimeException;

    /**
     * 根据主键更新记录，空值不会持久化到数据库
     * 
     * @param iamUserKey
     * @return
     * @throws Exception
     */
    public int updateByPrimaryKeySelective(IamUserKey iamUserKey) throws RuntimeException;

    /**
     * 根据SqlBuilder删除记录
     * 
     * @param iamUserSqlBuilder
     * @return
     * @throws Exception
     */
    public int deleteBySqlBuilder(IamUserSqlBuilder iamUserSqlBuilder) throws RuntimeException;

    /**
     * 根据主键删除记录
     * 
     * @param iamUserKey
     * @return
     * @throws Exception
     */
    public int deleteByPrimaryKey(IamUserKey iamUserKey) throws RuntimeException;


    public  int selectUserCode(Map<String,String> map);
}